package com.example.demo;

import org.openjdk.jol.info.ClassLayout;
import org.openjdk.jol.vm.VM;

/**
 * @author lance@oigcn.com
 * @version 1.0
 * @description
 * @date 2021-04-06 08:54
 **/
public class Header {


    public static void main(String[] args) throws InterruptedException {

         Boolean a=true;
        System.out.println(VM.current().details());
        System.out.println(ClassLayout.parseInstance(a).toPrintable());
        synchronized(a){
            System.out.println(ClassLayout.parseInstance(a).toPrintable());
        }

        Thread thread = new Thread(() -> {
            synchronized (a) {
                System.out.println("--THREAD--:"+ClassLayout.parseInstance(a).toPrintable());
            }
        });
        thread.start();
        thread.join();
        System.out.println("--END--:"+ClassLayout.parseInstance(a).toPrintable());
    }
}
